home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / northc / northc1.lzh / include / assert.h < prev    next >
C/C++ Source or Header  |  1990-08-30  |  317b  |  14 lines

  1. #ifndef ASSERT_H
  2. #define    ASSERT_H
  3.  
  4. #ifdef NDEBUG
  5. #define    assert(cond)
  6. #else
  7. /* NorthC does not define __FILE__ and __LINE__ */
  8. static char __AssertFmt[] = "assert failed in '%s' at line %d.\n";
  9. #define    assert(cond)    if(!(cond)) \
  10.  { fprintf(stderr, __AssertFmt, __FILE__, __LINE__); abort(); }
  11. #endif
  12.  
  13. #endif ASSERT_H
  14.